Determining the exact location of a mobile device (e.g., a smart phone operated by a user) in an environment can be quite challenging, especially when the mobile device is located in an urban environment or is located within a building. Imprecise estimates of the mobile device's altitude, for example, may have life or death consequences for the user of the mobile device since the imprecise altitude estimate can delay emergency personnel response times as they search for the user on multiple floors of a building. In less dire situations, imprecise altitude estimates can lead a user to the wrong area in an environment.
Different approaches exist for estimating an altitude of a mobile device. In a barometric-based positioning system, altitude can be computed using a measurement of pressure from a calibrated pressure sensor of a mobile device along with ambient pressure measurement(s) from a network of calibrated reference pressure sensors and a measurement of ambient temperature from the network or other source. An estimate of an altitude of a mobile device (hmobile) can be computed by the mobile device, a server, or another machine that receives needed information as follows:
                                          h            mobile                    =                                    h              sensor                        -                                                            RT                  remote                                gM                            ⁢                              ln                ⁡                                  (                                                            P                      sensor                                                              P                      mobile                                                        )                                                                    ,                            (                  Equation          ⁢                                          ⁢          1                )            where Pmobile is the estimate of pressure at the location of the mobile device by a pressure sensor of the mobile device, Psensor is an estimate of pressure at the location of a reference pressure sensor that is accurate to within a tolerated amount of pressure from true pressure (e.g., less than 5 Pa), Tremote is an estimate of temperature (e.g., in Kelvin) at the location of the reference pressure sensor or a different location of a remote temperature sensor, hsensor is an estimated altitude of the reference pressure sensor that is estimated to within a desired amount of altitude error (e.g., less than 1.0 meters), g corresponds to the acceleration due to gravity, R is a gas constant, and M is molar mass of air (e.g., dry air or other). The minus sign (−) may be substituted with a plus sign (+) in alternative embodiments of Equation 1, as would be understood by one of ordinary skill in the art. The estimate of pressure at the location of the reference pressure sensor can be converted to an estimated reference-level pressure that corresponds to the reference pressure sensor in that it specifies an estimate of pressure at the latitude and longitude of the reference pressure sensor, but at a reference-level altitude that likely differs from the altitude of the reference pressure sensor. The reference-level pressure can be determined as follows:
                                          P            ref                    =                                    P              sensor                        ×                          exp              ⁡                              (                                  -                                                            gM                      ⁡                                              (                                                                              h                            ref                                                    -                                                      h                            sensor                                                                          )                                                                                    RT                      remote                                                                      )                                                    ,                            (                  Equation          ⁢                                          ⁢          2                )            where Psensor is the estimate of pressure at the location of the reference pressure sensor, Pref is the reference-level pressure estimate, and href is the reference-level altitude. The altitude of the mobile device hmobile can be computed using Equation 1, where href is substituted for hsensor and Pref is substituted for Psensor. The reference-level altitude href may be any altitude and can be set at mean sea-level (MSL). When two or more reference-level pressure estimates are available, the reference-level pressure estimates are combined into a single reference-level pressure estimate value (e.g., using an average, weighted average, or other suitable combination of the reference pressures), and the single reference-level pressure estimate value is used for the reference-level pressure estimate Pref.
In some cases, the accuracy of a computed altitude for a mobile device located in an indoor environment (e.g., a building or a vehicle) is affected by a stack/chimney effect and/or an HVAC (heating, ventilation, and air conditioning) effect of that indoor environment. The stack/chimney effect in an environment is typically characterized by an environment's leakiness, and affects a pressure profile of an environment based on a difference between temperature inside the environment and temperature outside the environment. When an HVAC effect is present in an environment, sudden and significant pushing or pulling of pressure (e.g., from a deliberate over-pressurization or under-pressurization) in the environment can occur while a similar push or pull of pressure does not occur outside the environment. As a result, an estimated altitude computed using pushed or pulled pressure values in the environment can translate to meters of measured altitude error. Knowing when an HVAC effect is present in an environment can help determine when estimated altitudes are likely to have too much error and need to be ignored or adjusted.
Different approaches for detecting if a mobile device is located in an environment in which an adverse pressure variation effect (e.g., an HVAC effect) is affecting pressure measurements are described herein. The result of these approaches—e.g., a determination as to whether the mobile device is inside a particular environment (e.g., a building or vehicle)—is highly useful in various applications, such as determining when estimated altitudes are likely to have too much error if based on measurement of pressure determined from inside the environment.